<template>
    <view class="globe_back">
        <view class="box">
            <view class="fw_bold f_40 pb_24" v-if="type == 1">用户已付款，等待用户提车</view>
            <view class="fw_bold f_40 pb_24" v-if="type == 3">
                订单
                <text class="cl_FF6401">已超时</text>
                ，请联系用户归还车辆
            </view>
            <view class="fw_bold f_40 pb_24" v-if="type == 4">已完成</view>
            <view class="fw_bold f_40 pb_24 flex" v-if="type == 2">
                用户使用中，剩余
                <u-count-down :time="30 * 60 * 60 * 1000" format="DD:HH:mm:ss" autoStart millisecond @change="onChange">
                    <view class="time flex">
                        <view class="time__item">
                            <text class="cl_3377FF">{{ timeData.days }}</text>
                            &nbsp;天
                        </view>
                        <view class="time__item">
                            <text class="cl_3377FF">{{ timeData.hours > 10 ? timeData.hours : '0' + timeData.hours }}</text>
                            &nbsp;时
                        </view>
                    </view>
                </u-count-down>
            </view>

            <!-- 商品 -->
            <view class="flex back_fff p_24 br_24">
                <view>
                    <image class="shopImg" src="@/static/imgs/img.png" mode="widthFix"></image>
                </view>
                <view>
                    <view class="fw_bold f_32 listTitle">小牛电动 B0都市版新国标...</view>
                    <view class="flex justify_content_between">
                        <view class="cl_999CA3 mr_24 f_28">租期：2月</view>
                        <view class="cl_999CA3 mr_24 f_28">剩余：1月10天</view>
                    </view>
                    <view class="flex justify_content_end mt_40 f_28">￥50.25</view>
                </view>
            </view>
            <!-- 车信息 -->
            <view class="detailedBox">
                <view class="flex justify_content_between detailed">
                    <view>车架号</view>
                    <view>LVGBF53K0BG007588</view>
                </view>
                <view class="flex justify_content_between detailed">
                    <view>提车码</view>
                    <view>556201</view>
                </view>
                <view class="flex justify_content_between detailed">
                    <view>租车类型</view>
                    <view>月租</view>
                </view>
                <view class="flex justify_content_between detailed">
                    <view>租用月数</view>
                    <view>2月</view>
                </view>
                <view class="flex justify_content_between detailed" v-if="type == 2 || type == 3 || type == 4">
                    <view>已使用时间</view>
                    <view>2天</view>
                </view>
                <view class="flex justify_content_between detailed">
                    <view>所在地区</view>
                    <view>贵州省贵阳市南明区</view>
                </view>
                <view class="flex justify_content_between detailed">
                    <view>详细地址</view>
                    <view>花果园金融街一号楼1824</view>
                </view>
                <view class="flex justify_content_between detailed">
                    <view>联系电话</view>
                    <view>175****2100</view>
                </view>
            </view>
            <view class="detailedBox">
                <view class="flex justify_content_between detailed">
                    <view>押金</view>
                    <view>￥20.05</view>
                </view>
                <view class="flex justify_content_between detailed">
                    <view>租金</view>
                    <view>￥2000</view>
                </view>
                <view class="flex justify_content_between detailed">
                    <view>优惠</view>
                    <view>￥50.05</view>
                </view>
                <view class="flex justify_content_between detailed">
                    <view>合计</view>
                    <view class="fw_bold" style="color: #ff6401">￥3215.02</view>
                </view>
            </view>
            <view class="detailedBox">
                <view class="flex justify_content_between detailed">
                    <view>订单编号</view>
                    <view>
                        20225113215554
                        <text class="cl_3377FF">复制</text>
                    </view>
                </view>
                <view class="flex justify_content_between detailed">
                    <view>创建时间</view>
                    <view>2022-02-10 20:30:56</view>
                </view>
                <view class="flex justify_content_between detailed">
                    <view>付款时间</view>
                    <view>2022-02-10 20:30:56</view>
                </view>
                <view class="flex justify_content_between detailed" v-if="type == 2 || type == 3 || type == 4">
                    <view>提车时间</view>
                    <view>2022-02-10 20:30:56</view>
                </view>
            </view>
        </view>
        <view style="height: 20px"></view>
    </view>
</template>

<script>
export default {
    data() {
        return {
            url: '',
            type: 0,
            timeData: {}
        };
    },
    onShow() {
        this.url = this.baseUrl + this.imgPath;
    },
    onLoad(e) {
        this.type = e.type;
    },
    methods: {
        onChange(e) {
            this.timeData = e;
        }
    }
};
</script>

<style scoped lang="scss">
.buyerInfo {
    padding: 24rpx 32rpx;
    background: white;
    border-radius: 24rpx;
    margin: 24rpx 0;
    font-size: 28rpx;
    .name {
        margin-bottom: 16rpx;
    }
    .phone {
        color: #999ca3;
        margin-left: 16rpx;
    }
}
.shopImg {
    width: 200rpx;
    height: 200rpx;
    border-radius: 16rpx;
    margin-right: 24rpx;
}
.listTitle {
    width: 400rpx;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.box {
    padding: 32rpx;
    .addTitle {
        font-size: 40rpx;
        color: #00091a;
        font-weight: bold;
    }
    .addText {
        font-size: 28rpx;
        color: #999ca3;
        margin-top: 16rpx;
    }
    .icon_r {
        width: 32rpx;
        height: 32rpx;
        vertical-align: middle;
        margin-top: 36rpx;
    }
    .address {
        background: white;
        border-radius: 16rpx;
        padding: 24rpx;
    }
    .coupon,
    .detailedBox {
        background: white;
        border-radius: 16rpx;
        padding: 24rpx;
        margin-top: 24rpx;
    }
    .ProductMap {
        width: 200rpx;
        height: 200rpx;
        border-radius: 16rpx;
    }
    .couT {
        width: 30%;
        margin: 16rpx 0;
        color: #333a47;
        font-size: 28rpx;
    }
    .coutext {
        width: 70%;
        padding: 16rpx 0;
        font-size: 28rpx;
        color: #ccced1;
    }
    .couponIcon {
        width: 32rpx;
        height: 32rpx;
        vertical-align: middle;
    }
    .detailed {
        color: #333a47;
        font-size: 28rpx;
        margin-bottom: 32rpx;
    }
}
.button {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16rpx 32rpx;
    background: #ffffff;
    .buy {
        width: 176rpx;
        height: 76rpx;
        line-height: 76rpx;
        text-align: center;
        color: white;
        border-radius: 8rpx;
        background-image: linear-gradient(to right, #ff924d, #ff6401);
    }
}
.title {
    font-size: 28rpx;
    color: #333a47;
}
.info {
    font-size: 28rpx;
    color: #00091a;
    margin-top: 32rpx;
}
.infoimg {
    width: 140rpx;
    height: 140rpx;
    border-radius: 16rpx;
    margin: 24rpx 12rpx;
}
.store {
    padding: 24rpx;
    background: white;
    border-radius: 24rpx;
    margin-top: 30rpx;
}
.storeImg {
    width: 96rpx;
    height: 96rpx;
    border-radius: 16rpx;
    margin-right: 16rpx;
}
.storeTitle {
    color: #00091a;
    font-size: 32rpx;
    margin-bottom: 8rpx;
}
.address {
    width: 48rpx;
    height: 48rpx;
    display: block;
    margin: 0 auto;
}
.addressText {
    color: #999ca3;
    font-size: 24rpx;
}
.salesVolume {
    color: #999ca3;
    font-size: 28rpx;
}
</style>
